<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Section 7.5.2: Experiment design</title>
<link rel="canonical" href="/Users/mcgrant/Repos/CVX/examples/cvxbook/Ch07_statistical_estim/html/expdesign.html">
<link rel="stylesheet" href="../../../examples.css" type="text/css">
</head>
<body>
<div id="header">
<h1>Section 7.5.2: Experiment design</h1>
Jump to:&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#source">Source code</a>&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#output">Text output</a>
&nbsp;&nbsp;&nbsp;&nbsp;
<a href="#plots">Plots</a>
&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../../index.html">Library index</a>
</div>
<div id="content">
<a id="source"></a>
<pre class="codeinput">
<span class="comment">% Boyd &amp; Vandenberghe, "Convex Optimization"</span>
<span class="comment">% Original version by Lieven Vandenberghe</span>
<span class="comment">% Updated for CVX by Almir Mutapcic - Jan 2006</span>
<span class="comment">% (a figure is generated)</span>
<span class="comment">%</span>
<span class="comment">% This is an example of D-optimal, A-optimal, and E-optimal</span>
<span class="comment">% experiment designs.</span>

<span class="comment">% problem data</span>
m = 10;
angles1 = linspace(3*pi/4,pi,m);
angles2 = linspace(0,-pi/2,m);

<span class="comment">% sensor positions</span>
V = [3.0*[cos(angles1); sin(angles1)], <span class="keyword">...</span>
     1.5*[cos(angles2); sin(angles2)]];
p = size(V,2);
n = 2;
noangles = 5000;

<span class="comment">% D-optimal design</span>
<span class="comment">%</span>
<span class="comment">%      maximize    log det V*diag(lambda)*V'</span>
<span class="comment">%      subject to  sum(lambda)=1,  lambda &gt;=0</span>
<span class="comment">%</span>

<span class="comment">% setup the problem and solve it</span>
cvx_begin
  variable <span class="string">lambda(p)</span>
  maximize ( det_rootn( V*diag(lambda)*V' ) )
  subject <span class="string">to</span>
    sum(lambda) == 1;
    lambda &gt;= 0;
cvx_end
lambdaD = lambda; <span class="comment">% save the solution for confidence ellipsoids</span>

<span class="comment">% plot results</span>
figure(1)
<span class="comment">% draw ellipsoid v'*W*v &lt;= 2</span>
W = inv(V*diag(lambda)*V');
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(2)*(R\[cos(angles); sin(angles)]);
d = plot(ellipsoid(1,:), ellipsoid(2,:), <span class="string">'--'</span>, 0,0,<span class="string">'+'</span>);
set(d, <span class="string">'Color'</span>, [0 0.5 0]); set(d(2),<span class="string">'MarkerFaceColor'</span>,[0 0.5 0]);
hold <span class="string">on</span>;

dot=plot(V(1,:),V(2,:),<span class="string">'o'</span>);
ind = find(lambda &gt; 0.001);
dots = plot(V(1,ind),V(2,ind),<span class="string">'o'</span>);
set(dots,<span class="string">'MarkerFaceColor'</span>,<span class="string">'blue'</span>);

<span class="comment">% print out nonzero lambda</span>
disp(<span class="string">'Nonzero lambda values for D design:'</span>);
<span class="keyword">for</span> i=1:length(ind)
   text(V(1,ind(i)),V(2,ind(i)), [<span class="string">'l'</span>,int2str(ind(i))]);
   disp([<span class="string">'lambda('</span>,int2str(ind(i)),<span class="string">') = '</span>, num2str(lambda(ind(i)))]);
<span class="keyword">end</span>;

<span class="comment">%axis([-4.5 4.5 -4.5 4.5])</span>
axis([-5 5 -5 5])
set(gca,<span class="string">'Xtick'</span>,[]);
set(gca,<span class="string">'Ytick'</span>,[]);
hold <span class="string">off</span>, axis <span class="string">off</span>
<span class="comment">% print -deps Ddesign.eps</span>

<span class="comment">% A-optimal design</span>
<span class="comment">%</span>
<span class="comment">%      minimize    Trace (sum_i lambdai*vi*vi')^{-1}</span>
<span class="comment">%      subject to  lambda &gt;= 0, 1'*lambda = 1</span>
<span class="comment">%</span>

<span class="comment">% SDP formulation</span>
e = eye(2,2);
cvx_begin <span class="string">sdp</span>
  variables <span class="string">lambda(p)</span> <span class="string">u(n)</span>
  minimize ( sum(u) )
  subject <span class="string">to</span>
    <span class="keyword">for</span> k = 1:n
      [ V*diag(lambda)*V'  e(:,k);
        e(k,:)             u(k)   ] &gt;= 0;
    <span class="keyword">end</span>
    sum(lambda) == 1;
    lambda &gt;= 0;
cvx_end
lambdaA = lambda; <span class="comment">% save the solution for confidence ellipsoids</span>

<span class="comment">% plot results</span>
figure(2)
<span class="comment">% draw ellipsoid v'*W*v &lt;= mu</span>
W = inv(V*diag(lambda)*V')^2;
mu = diag(V'*W*V);
mu = mean(mu(ind));
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(mu)*(R\[cos(angles); sin(angles)]);
d = plot(ellipsoid(1,:), ellipsoid(2,:), <span class="string">'--'</span>,0,0,<span class="string">'+'</span>);
set(d, <span class="string">'Color'</span>, [0 0.5 0]);
set(d(2), <span class="string">'MarkerFaceColor'</span>, [0 0.5 0]);
hold <span class="string">on</span>

dot = plot(V(1,:),V(2,:),<span class="string">'o'</span>);
ind = find(lambda &gt; 0.001);
dots = plot(V(1,ind),V(2,ind),<span class="string">'o'</span>);
set(dots,<span class="string">'MarkerFaceColor'</span>,<span class="string">'blue'</span>);

disp(<span class="string">'Nonzero lambda values for A design:'</span>);
<span class="keyword">for</span> i=1:length(ind)
   text(V(1,ind(i)),V(2,ind(i)), [<span class="string">'l'</span>,int2str(ind(i))]);
   disp([<span class="string">'lambda('</span>,int2str(ind(i)),<span class="string">') = '</span>, num2str(lambda(ind(i)))]);
<span class="keyword">end</span>;
<span class="comment">%axis([-4.5 4.5 -4.5 4.5])</span>
axis([-5 5 -5 5])
set(gca,<span class="string">'Xtick'</span>,[]);
set(gca,<span class="string">'Ytick'</span>,[]);
axis <span class="string">off</span>, hold <span class="string">off</span>
<span class="comment">% print -deps Adesign.eps</span>

<span class="comment">% E-optimal design</span>
<span class="comment">%</span>
<span class="comment">%      minimize    w</span>
<span class="comment">%      subject to  sum_i lambda_i*vi*vi' &gt;= w*I</span>
<span class="comment">%                  lambda &gt;= 0,  1'*lambda = 1;</span>
<span class="comment">%</span>

cvx_begin <span class="string">sdp</span>
  variables <span class="string">t</span> <span class="string">lambda(p)</span>
  maximize ( t )
  subject <span class="string">to</span>
    V*diag(lambda)*V' &gt;= t*eye(n,n);
    sum(lambda) == 1;
    lambda &gt;= 0;
cvx_end

lambdaE = lambda; <span class="comment">% save the solution for confidence ellipsoids</span>

figure(3)
<span class="comment">% draw ellipsoid v'*W*v &lt;= mu</span>
mu = diag(V'*W*V);
mu = mean(mu(ind));
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(mu)*(R\[cos(angles); sin(angles)]);
d = plot(ellipsoid(1,:), ellipsoid(2,:), <span class="string">'--'</span>, 0, 0, <span class="string">'+'</span>);
set(d, <span class="string">'Color'</span>, [0 0.5 0]);
set(d(2), <span class="string">'MarkerFaceColor'</span>, [0 0.5 0]);
hold <span class="string">on</span>

dot = plot(V(1,:),V(2,:),<span class="string">'o'</span>);
lambda = lambda(1:p);
ind = find(lambda &gt; 0.001);
dots = plot(V(1,ind),V(2,ind),<span class="string">'o'</span>);
set(dots,<span class="string">'MarkerFaceColor'</span>,<span class="string">'blue'</span>);

disp(<span class="string">'Nonzero lambda values for E design:'</span>);
<span class="keyword">for</span> i=1:length(ind)
   text(V(1,ind(i)),V(2,ind(i)), [<span class="string">'l'</span>,int2str(ind(i))]);
   disp([<span class="string">'lambda('</span>,int2str(ind(i)),<span class="string">') = '</span>, num2str(lambda(ind(i)))]);
<span class="keyword">end</span>;
<span class="comment">%axis([-4.5 4.5 -4.5 4.5])</span>
axis([-5 5 -5 5])
set(gca,<span class="string">'Xtick'</span>,[]);
set(gca,<span class="string">'Ytick'</span>,[]);
axis <span class="string">off</span>, hold <span class="string">off</span>
<span class="comment">% print -deps Edesign.eps</span>


<span class="comment">% confidence ellipsoids</span>
eta = 6.2514; <span class="comment">% chi2inv(.9,3) value (command available in stat toolbox)</span>
<span class="comment">% draw 90 percent confidence ellipsoid  for D design</span>
W = V*diag(lambdaD)*V';
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(eta)*(R\[cos(angles); sin(angles)]);

figure(4)
plot(0,0,<span class="string">'ok'</span>,ellipsoid(1,:), ellipsoid(2,:), <span class="string">'-'</span>);
text(ellipsoid(1,1100),ellipsoid(2,1100),<span class="string">'D'</span>);
hold <span class="string">on</span>

<span class="comment">% draw 90 percent confidence ellipsoid  for A design</span>
W = V*diag(lambdaA)*V';
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(eta)*(R\[cos(angles); sin(angles)]);
plot(0,0,<span class="string">'ok'</span>,ellipsoid(1,:), ellipsoid(2,:), <span class="string">'-'</span>);
text(ellipsoid(1,1),ellipsoid(2,1),<span class="string">'A'</span>);

<span class="comment">% draw 90 percent confidence ellipsoid  for E design</span>
W = V*diag(lambdaE)*V';
angles = linspace(0,2*pi,noangles);
R = chol(W);  <span class="comment">% W = R'*R</span>
ellipsoid = sqrt(eta)*(R\[cos(angles); sin(angles)]);
d=plot(0,0,<span class="string">'ok'</span>,ellipsoid(1,:), ellipsoid(2,:), <span class="string">'-'</span>);
set(d,<span class="string">'Color'</span>,[0 0.5 0]);
text(ellipsoid(1,4000),ellipsoid(2,4000),<span class="string">'E'</span>);

<span class="comment">% draw 90 percent confidence ellipsoid  for uniform design</span>
W_u = inv(V*V'/p);
R = chol(W_u);  <span class="comment">% W = R'*R</span>
ellipsoid_u = sqrt(eta)*(R\[cos(angles); sin(angles)]);
plot(ellipsoid_u(1,:), ellipsoid_u(2,:), <span class="string">'--'</span>);
text(ellipsoid_u(1),ellipsoid_u(2),<span class="string">'U'</span>);
set(gca,<span class="string">'Xtick'</span>,[]);
set(gca,<span class="string">'Ytick'</span>,[]);
axis <span class="string">off</span>
<span class="comment">% print -deps confidence.eps</span>
hold <span class="string">off</span>
</pre>
<a id="output"></a>
<pre class="codeoutput">
 
Calling Mosek 9.1.9: 34 variables, 10 equality constraints
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:32:15)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: MACOSX/64-X86

MOSEK warning 710: #2 (nearly) zero elements are specified in sparse col '' (12) of matrix 'A'.
MOSEK warning 710: #2 (nearly) zero elements are specified in sparse col '' (22) of matrix 'A'.
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 10              
  Cones                  : 1               
  Scalar variables       : 24              
  Matrix variables       : 1               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.00    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 10              
  Cones                  : 1               
  Scalar variables       : 24              
  Matrix variables       : 1               
  Integer variables      : 0               

Optimizer  - threads                : 8               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 10
Optimizer  - Cones                  : 1
Optimizer  - Scalar variables       : 23                conic                  : 3               
Optimizer  - Semi-definite variables: 1                 scalarized             : 10              
Factor     - setup time             : 0.00              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 49                after factor           : 49              
Factor     - dense dim.             : 0                 flops                  : 1.07e+03        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.0e+00  1.0e+00  1.0e+00  0.00e+00   0.000000000e+00   0.000000000e+00   1.0e+00  0.00  
1   2.8e-01  2.8e-01  1.5e-01  9.00e-01   -6.099419583e-01  -6.151349439e-01  2.8e-01  0.01  
2   1.0e-01  1.0e-01  6.2e-02  3.60e-01   -2.100567633e+00  -1.935844370e+00  1.0e-01  0.01  
3   3.7e-02  3.7e-02  1.3e-02  1.00e+00   -2.477214979e+00  -2.423814987e+00  3.7e-02  0.01  
4   1.2e-02  1.2e-02  2.5e-03  8.96e-01   -2.871811315e+00  -2.851360554e+00  1.2e-02  0.01  
5   7.4e-04  7.4e-04  4.0e-05  8.85e-01   -3.161111814e+00  -3.159716259e+00  7.4e-04  0.01  
6   2.1e-05  2.1e-05  2.0e-07  9.94e-01   -3.181508258e+00  -3.181464753e+00  2.1e-05  0.01  
7   3.4e-06  3.4e-06  1.3e-08  9.98e-01   -3.181896330e+00  -3.181889011e+00  3.4e-06  0.01  
8   3.8e-07  3.8e-07  4.9e-10  9.99e-01   -3.181969805e+00  -3.181968986e+00  3.8e-07  0.01  
9   3.9e-08  3.9e-08  1.6e-11  1.00e+00   -3.181979263e+00  -3.181979179e+00  3.9e-08  0.01  
10  3.5e-09  3.6e-09  4.2e-13  1.00e+00   -3.181980399e+00  -3.181980392e+00  3.5e-09  0.01  
Optimizer terminated. Time: 0.02    


Interior-point solution summary
  Problem status  : PRIMAL_AND_DUAL_FEASIBLE
  Solution status : OPTIMAL
  Primal.  obj: -3.1819803992e+00   nrm: 7e+00    Viol.  con: 7e-09    var: 2e-09    barvar: 0e+00    cones: 0e+00  
  Dual.    obj: -3.1819803917e+00   nrm: 3e+00    Viol.  con: 0e+00    var: 1e-15    barvar: 8e-09    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 0.02    
    Interior-point          - iterations : 10        time: 0.01    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +3.18198
 
Nonzero lambda values for D design:
lambda(1) = 0.50003
lambda(10) = 0.49997
 
Calling Mosek 9.1.9: 32 variables, 11 equality constraints
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:32:15)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: MACOSX/64-X86

MOSEK warning 710: #4 (nearly) zero elements are specified in sparse col '' (9) of matrix 'A'.
MOSEK warning 710: #4 (nearly) zero elements are specified in sparse col '' (19) of matrix 'A'.
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 11              
  Cones                  : 0               
  Scalar variables       : 20              
  Matrix variables       : 2               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 1                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.00    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 11              
  Cones                  : 0               
  Scalar variables       : 20              
  Matrix variables       : 2               
  Integer variables      : 0               

Optimizer  - threads                : 8               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 11
Optimizer  - Cones                  : 0
Optimizer  - Scalar variables       : 20                conic                  : 0               
Optimizer  - Semi-definite variables: 2                 scalarized             : 12              
Factor     - setup time             : 0.00              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 46                after factor           : 46              
Factor     - dense dim.             : 0                 flops                  : 1.54e+03        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   2.0e+00  1.0e+00  3.0e+00  0.00e+00   2.000000000e+00   0.000000000e+00   1.0e+00  0.00  
1   3.6e-01  1.8e-01  3.0e-01  1.43e-01   1.338526336e+00   9.160379630e-01   1.8e-01  0.01  
2   1.1e-01  5.6e-02  4.3e-02  1.11e+00   1.046442677e+00   9.128418787e-01   5.6e-02  0.01  
3   4.2e-02  2.1e-02  8.9e-03  1.47e+00   9.808576717e-01   9.399794279e-01   2.1e-02  0.01  
4   9.1e-03  4.6e-03  9.6e-04  1.10e+00   8.851796681e-01   8.769996235e-01   4.6e-03  0.01  
5   6.7e-04  3.3e-04  2.1e-05  9.61e-01   8.520571236e-01   8.514922333e-01   3.3e-04  0.01  
6   1.6e-05  7.8e-06  7.5e-08  9.94e-01   8.495899872e-01   8.495766969e-01   7.8e-06  0.01  
7   6.8e-07  3.4e-07  6.9e-10  9.99e-01   8.495305055e-01   8.495299248e-01   3.4e-07  0.01  
8   7.8e-08  3.9e-08  2.6e-11  1.00e+00   8.495281947e-01   8.495281283e-01   3.9e-08  0.01  
9   9.4e-09  4.7e-09  1.1e-12  1.00e+00   8.495279546e-01   8.495279466e-01   4.7e-09  0.01  
Optimizer terminated. Time: 0.01    


Interior-point solution summary
  Problem status  : PRIMAL_AND_DUAL_FEASIBLE
  Solution status : OPTIMAL
  Primal.  obj: 8.4952795464e-01    nrm: 5e+00    Viol.  con: 5e-09    var: 0e+00    barvar: 0e+00  
  Dual.    obj: 8.4952794664e-01    nrm: 1e+00    Viol.  con: 0e+00    var: 1e-16    barvar: 5e-09  
Optimizer summary
  Optimizer                 -                        time: 0.01    
    Interior-point          - iterations : 9         time: 0.01    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +0.849528
 
Nonzero lambda values for A design:
lambda(1) = 0.2966
lambda(10) = 0.37795
lambda(20) = 0.32544
 
Calling Mosek 9.1.9: 23 variables, 3 equality constraints
------------------------------------------------------------

MOSEK Version 9.1.9 (Build date: 2019-11-21 11:32:15)
Copyright (c) MOSEK ApS, Denmark. WWW: mosek.com
Platform: MACOSX/64-X86

MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (3) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (12) of matrix 'A'.
MOSEK warning 710: #1 (nearly) zero elements are specified in sparse col '' (22) of matrix 'A'.
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 3               
  Cones                  : 1               
  Scalar variables       : 23              
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer started.
Presolve started.
Linear dependency checker started.
Linear dependency checker terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator started.
Freed constraints in eliminator : 0
Eliminator terminated.
Eliminator - tries                  : 2                 time                   : 0.00            
Lin. dep.  - tries                  : 1                 time                   : 0.00            
Lin. dep.  - number                 : 0               
Presolve terminated. Time: 0.00    
Problem
  Name                   :                 
  Objective sense        : min             
  Type                   : CONIC (conic optimization problem)
  Constraints            : 3               
  Cones                  : 1               
  Scalar variables       : 23              
  Matrix variables       : 0               
  Integer variables      : 0               

Optimizer  - threads                : 8               
Optimizer  - solved problem         : the primal      
Optimizer  - Constraints            : 3
Optimizer  - Cones                  : 1
Optimizer  - Scalar variables       : 23                conic                  : 3               
Optimizer  - Semi-definite variables: 0                 scalarized             : 0               
Factor     - setup time             : 0.00              dense det. time        : 0.00            
Factor     - ML order time          : 0.00              GP order time          : 0.00            
Factor     - nonzeros before factor : 6                 after factor           : 6               
Factor     - dense dim.             : 0                 flops                  : 2.44e+02        
ITE PFEAS    DFEAS    GFEAS    PRSTATUS   POBJ              DOBJ              MU       TIME  
0   1.0e+00  9.0e+00  2.0e+00  0.00e+00   1.000000000e+00   0.000000000e+00   1.0e+00  0.00  
1   2.1e-01  1.9e+00  3.4e-01  -2.77e-01  -1.792668816e+00  -1.817470354e+00  2.1e-01  0.01  
2   4.0e-02  3.6e-01  1.2e-02  1.42e+00   -1.687864078e+00  -1.759043337e+00  4.0e-02  0.01  
3   7.3e-03  6.6e-02  1.1e-03  1.17e+00   -1.797933288e+00  -1.808227493e+00  7.3e-03  0.01  
4   1.1e-04  9.6e-04  2.0e-06  1.05e+00   -1.799891394e+00  -1.800034024e+00  1.1e-04  0.01  
5   2.1e-07  1.9e-06  1.7e-10  1.00e+00   -1.799999788e+00  -1.800000066e+00  2.1e-07  0.01  
6   2.9e-13  2.6e-12  2.4e-16  1.00e+00   -1.800000000e+00  -1.800000000e+00  2.9e-13  0.01  
Optimizer terminated. Time: 0.01    


Interior-point solution summary
  Problem status  : PRIMAL_AND_DUAL_FEASIBLE
  Solution status : OPTIMAL
  Primal.  obj: -1.8000000000e+00   nrm: 1e+00    Viol.  con: 3e-13    var: 1e-13    cones: 0e+00  
  Dual.    obj: -1.8000000000e+00   nrm: 2e+00    Viol.  con: 0e+00    var: 3e-13    cones: 0e+00  
Optimizer summary
  Optimizer                 -                        time: 0.01    
    Interior-point          - iterations : 6         time: 0.01    
      Basis identification  -                        time: 0.00    
        Primal              - iterations : 0         time: 0.00    
        Dual                - iterations : 0         time: 0.00    
        Clean primal        - iterations : 0         time: 0.00    
        Clean dual          - iterations : 0         time: 0.00    
    Simplex                 -                        time: 0.00    
      Primal simplex        - iterations : 0         time: 0.00    
      Dual simplex          - iterations : 0         time: 0.00    
    Mixed integer           - relaxations: 0         time: 0.00    

------------------------------------------------------------
Status: Solved
Optimal value (cvx_optval): +1.8
 
Nonzero lambda values for E design:
lambda(10) = 0.2
lambda(20) = 0.8
</pre>
<a id="plots"></a>
<div id="plotoutput">
<img src="expdesign__01.png" alt=""> <img src="expdesign__02.png" alt=""> <img src="expdesign__03.png" alt=""> <img src="expdesign__04.png" alt=""> 
</div>
</div>
</body>
</html>